A VDB or virtual database definition is contained in an XML file. For .vdb archive files created in the design tool, this file is embedded in the archive and most field can be updated through tooling. The XML schema for this file can be found in the teiid-docs/schema directory.
Example VDB XML
<vdb name="${vdb-name}" version="${vdb-version}">
<!-- VDB properties -->
<property name="UseConnectorMetadata" value="..." />
<import-vdb name="..." version="..." import-data-policies="TRUE|FALSE"/>
<!-- define a model fragment for each data source -->
<model name="${model-name}">
<property name="..." value="..." />
<source name="${source-name}" translator-name="${translator-name}" connection-jndi-name="${deployed-jndi-name}">
</model>
<!-- create translator instances that override default properties -->
<translator name="${translator-name}" type="${translator-type}" />
<property name="..." value="..." />
</translator>
</vdb>
VDB Element
Attributes
Property Elements
import-vdb Element
Attributes
Model Element
Attributes
Source Element
A source is a named binding of a translator and connection source to a model.
-
name
The name of the source to use for this model. This can be any name you like, but will typically be the same as the model name. Having a name different than the model name is only useful in multi-source scenarios. In multi-source, the source names under a given model must be unique. If you have the same source bound to multiple models it may have the same name for each. An exception will be raised if the same source name is used for different sources.
-
translator-name
The name or type of the Teiid Translator to use. Possible values include the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.) and translators defined in the translators section.
Property Elements
Translator Element
Attributes
-
type
The base type of the Translator. Can be one of the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.).
Property Elements